<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html 
     PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Class: Origami::HintStream</title>
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <meta http-equiv="Content-Script-Type" content="text/javascript" />
  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
  <script type="text/javascript">
  // <![CDATA[

  function popupCode( url ) {
    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
  }

  function toggleCode( id ) {
    if ( document.getElementById )
      elem = document.getElementById( id );
    else if ( document.all )
      elem = eval( "document.all." + id );
    else
      return false;

    elemStyle = elem.style;
    
    if ( elemStyle.display != "block" ) {
      elemStyle.display = "block"
    } else {
      elemStyle.display = "none"
    }

    return true;
  }
  
  // Make codeblocks hidden by default
  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
  
  // ]]>
  </script>

</head>
<body>



    <div id="classHeader">
        <table class="header-table">
        <tr class="top-aligned-row">
          <td><strong>Class</strong></td>
          <td class="class-name-in-header">Origami::HintStream</td>
        </tr>
        <tr class="top-aligned-row">
            <td><strong>In:</strong></td>
            <td>
                <a href="../../files/origami/linearization_rb.html">
                origami/linearization.rb
                </a>
        <br />
            </td>
        </tr>

        <tr class="top-aligned-row">
            <td><strong>Parent:</strong></td>
            <td>
                <a href="Stream.html">
                Stream
               </a>
            </td>
        </tr>
        </table>
    </div>
  <!-- banner header -->

  <div id="bodyContent">



  <div id="contextContent">



   </div>

    <div id="method-list">
      <h3 class="section-bar">Methods</h3>

      <div class="name-list">
      <a href="#M000587">pre_build</a>&nbsp;&nbsp;
      </div>
    </div>

  </div>


    <!-- if includes -->

    <div id="section">





    <div id="attribute-list">
      <h3 class="section-bar">Attributes</h3>

      <div class="name-list">
        <table>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">embedded_files_table</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">information_dictionary_table</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">interactive_forms_table</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">logical_structure_table</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">named_destinations_table</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">outlines_table</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">page_labels_table</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">page_offset_table</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">renditions_table</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">shared_objects_table</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">threads_table</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        <tr class="top-aligned-row context-row">
          <td class="context-item-name">thumbnails_table</td>
          <td class="context-item-value">&nbsp;[RW]&nbsp;</td>
          <td class="context-item-desc"></td>
        </tr>
        </table>
      </div>
    </div>
      


    <!-- if method_list -->
    <div id="methods">
      <h3 class="section-bar">Public Instance methods</h3>

      <div id="method-M000587" class="method-detail">
        <a name="M000587"></a>

        <div class="method-heading">
          <a href="#M000587" class="method-signature">
          <span class="method-name">pre_build</span><span class="method-args">()</span>
          </a>
        </div>
      
        <div class="method-description">
          <p><a class="source-toggle" href="#"
            onclick="toggleCode('M000587-source');return false;">[Source]</a></p>
          <div class="method-source-code" id="M000587-source">
<pre>
     <span class="ruby-comment cmt"># File origami/linearization.rb, line 283</span>
283:     <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">pre_build</span>
284:       <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@page_offset_table</span>.<span class="ruby-identifier">nil?</span>
285:         <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidHintStreamObjectError</span>, <span class="ruby-value str">&quot;No page offset hint table&quot;</span>
286:       <span class="ruby-keyword kw">end</span>
287: 
288:       <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@shared_objects_table</span>.<span class="ruby-identifier">nil?</span>
289:         <span class="ruby-identifier">raise</span> <span class="ruby-constant">InvalidHintStreamObjectError</span>, <span class="ruby-value str">&quot;No shared objects hint table&quot;</span>
290:       <span class="ruby-keyword kw">end</span>
291: 
292:       <span class="ruby-ivar">@data</span> = <span class="ruby-value str">&quot;&quot;</span>
293:       <span class="ruby-identifier">save_table</span>(<span class="ruby-ivar">@page_offset_table</span>)
294:       <span class="ruby-identifier">save_table</span>(<span class="ruby-ivar">@shared_objects_table</span>,         <span class="ruby-identifier">:S</span>)
295:       <span class="ruby-identifier">save_table</span>(<span class="ruby-ivar">@thumbnails_table</span>,             <span class="ruby-identifier">:T</span>)
296:       <span class="ruby-identifier">save_table</span>(<span class="ruby-ivar">@outlines_table</span>,               <span class="ruby-identifier">:O</span>)
297:       <span class="ruby-identifier">save_table</span>(<span class="ruby-ivar">@threads_table</span>,                <span class="ruby-identifier">:A</span>)
298:       <span class="ruby-identifier">save_table</span>(<span class="ruby-ivar">@named_destinations_table</span>,     <span class="ruby-identifier">:E</span>)
299:       <span class="ruby-identifier">save_table</span>(<span class="ruby-ivar">@interactive_forms_table</span>,      <span class="ruby-identifier">:V</span>)
300:       <span class="ruby-identifier">save_table</span>(<span class="ruby-ivar">@information_dictionary_table</span>, <span class="ruby-identifier">:I</span>)
301:       <span class="ruby-identifier">save_table</span>(<span class="ruby-ivar">@logical_structure_table</span>,      <span class="ruby-identifier">:C</span>)
302:       <span class="ruby-identifier">save_table</span>(<span class="ruby-ivar">@page_labels_table</span>,            <span class="ruby-identifier">:L</span>)
303:       <span class="ruby-identifier">save_table</span>(<span class="ruby-ivar">@renditions_table</span>,             <span class="ruby-identifier">:R</span>)
304:       <span class="ruby-identifier">save_table</span>(<span class="ruby-ivar">@embedded_files_table</span>,         <span class="ruby-identifier">:B</span>)
305:       
306:       <span class="ruby-keyword kw">super</span>
307:     <span class="ruby-keyword kw">end</span>
</pre>
          </div>
        </div>
      </div>


    </div>


  </div>


<div id="validator-badges">
  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
</div>

</body>
</html>